<div class="cell">
  <span>{{ name }}</span>
  <span [ngStyle]="{ color: price > 1e4 ? 'purple' : 'black' }"
    >￥{{ price }}</span
  >
  <div>
    <button (click)="doMinus()">-</button>
    <span>{{ count }}</span>
    <button (click)="count = count + 1">+</button>
  </div>
  <span [ngClass]="{ gold: count * price > 1e5 }">￥{{ count * price }}</span>
</div>

<div>
  <button (click)="price = price + 100">涨价</button>
  <!-- 双向数据绑定 ：form-->
  <input type="text" [(ngModel)]="name" />
</div>
